package com.amigo.online.provider.ffmpeg.common;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class ConstantValue {

    /**
     * MP4格式结尾
     */
    public static String MP4 = ".mp4";

    /**
     * MP3格式 结尾
     */
    public static String MP3 = ".mp3";

    /**
     *  水印图片 S 号
     */
    //public static String LOGO_S;

    /**
     *  水印图片 M 号
     */
    //public static String LOGO_M;

    /**
     *  水印图片 L 号
     */
    //public static String LOGO_L;

    /**
     *  水印图片 XL 号
     */
    //public static String LOGO_XL;

    /**
     * 水印图片 XXL 号
     */
    public static String LOGO_XXL;

    /**
     * 服务地址
     */
    public static String SERVER_URL;

    /**
     * 水印字体颜色
     */
    public static String FONT_COLOR;

    /**
     * 水印字体类型
     */
    public static String FONT_TYPE;

    /**
     * ffmpeg 服务器目录
     */
    public static String FFMPEG_PATH;

    /**
     * 用户抽离音乐临时存放目录
     */
    public static String MUSIC_TMP_PATH;

    /**
     * 水印视频临时存放目录
     */
    public static String VIDEO_TMP_PATH;

    /**
     * 服务器home 目录
     */
    public static final String HOME_PATH;

    public static String FASTDSF_SECRET_KEY;

    public static int FASTDSF_HTTP_PORT;

    public static String FASTDSF_TRACKER_SERVER;

    public static boolean FASTDSF_ANTI_STEAL_TOKEN;

    public static int FASTDSF_CONNECTION_TIMEOUT;

    public static int FASTDSF_NETWORK_TIMEOUT;

    public static String FASTDSF_CHARSET;

    public static int FASTDSF_TRACKER_SERVER_PORT;

    /**
     *  windows下：C:\Users\用户名\
     *  linux下：/root
     */
    static {
        HOME_PATH = System.getProperty("user.home");
    }

    @Value("${SERVER_URL}")
    public void setServerUrl(String ServerUrl) {
        SERVER_URL = ServerUrl;
    }

    @Value("${FONT_TYPE}")
    public void setFontType(String fontType) {
        FONT_TYPE = fontType;
    }

    @Value("${FONT_COLOR}")
    public void setFontColor(String fontColor) {
        FONT_COLOR = fontColor;
    }

    @Value("${ffmpeg_path}")
    public void setFFMPEG_PATH(String fFMPEG_PATH) {
        FFMPEG_PATH = fFMPEG_PATH;
    }

    @Value("${music_tmp_path}")
    public void setMUSIC_TMP_PATH(String tMP_PATH) {
        MUSIC_TMP_PATH = tMP_PATH;
    }

    @Value("${video_tmp_path}")
    public void setVIDEO_TMP_PATH(String tMP_PATH) {
        VIDEO_TMP_PATH = tMP_PATH;
    }
	
/*	@Value("${LOGO_S}")
	public void setLogoS(String logoS) {
		LOGO_S = logoS;
	}
	
	@Value("${LOGO_M}")
	public void setLogoM(String logoM) {
		LOGO_M = logoM;
	}
	
	@Value("${LOGO_L}")
	public void setLogoL(String logoL) {
		LOGO_L = logoL;
	}
	
	@Value("${LOGO_XL}")
	public void setLogoXL(String logoXL) {
		LOGO_XL = logoXL;
	}*/

    @Value("${LOGO_XXL}")
    public void setLogoXXL(String logoXXL) {
        LOGO_XXL = logoXXL;
    }

    @Value("${http.secret_key}")
    public void setFastdsfSecretKey(String secret_key) {
        FASTDSF_SECRET_KEY = secret_key;
    }

    @Value("${http.tracker_http_port}")
    public void setFastdsfPort(int port) {
        FASTDSF_HTTP_PORT = port;
    }

    @Value("${tracker_server}")
    public void setFastdsfTrackerServer(String tracker_server) {
        FASTDSF_TRACKER_SERVER = tracker_server;
    }

    @Value("${http.anti_steal_token}")
    public void isFastdsfAntiStealToken(boolean anti_steal_token) {
        FASTDSF_ANTI_STEAL_TOKEN = anti_steal_token;
    }

    @Value("${connect_timeout}")
    public void setFastdsfConnectionTimeout(int connect_timeout) {
        FASTDSF_CONNECTION_TIMEOUT = connect_timeout;
    }

    @Value("${network_timeout}")
    public void setFastdsfNetworkTimeout(int network_timeout) {
        FASTDSF_NETWORK_TIMEOUT = network_timeout;
    }

    @Value("${charset}")
    public void setFastdsfCharset(String charset) {
        FASTDSF_CHARSET = charset;
    }

    @Value("${tracker_server_port}")
    public static void setFASTDSF_TRACKER_SERVER_PORT(int fASTDSF_TRACKER_SERVER_PORT) {
        FASTDSF_TRACKER_SERVER_PORT = fASTDSF_TRACKER_SERVER_PORT;
    }


}
